GitHub gpg signing 設定
mac でGitHubのgpg signingを設定する方法 code:sh
$ brew install gnupg
$ brew install pinentry-mac
暗号化方式や鍵の長さなど良しなに設定する
code:sh
$ gpg --full-generate-key
作成した鍵のIDを確認
code:sh
$ gpg --list-secret-keys --keyid-format short
code:sh
$ echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
homebrew の更新があるので、今は /opt/homebrew/bin/pinentry-mac かも
code:sh
$ gpg --armor --export <id>
使用時に自動で再起動する
code:sh
killall gpg-agent
gitconfig (~/.gitconfig)を編集する
3箇所変更する
code:.gitconfig
email = yyyyy # gpg key 作成時に使用したものと同じもの、かつ GitHub に登録済みのメールアドレス
signingkey = XXXXXX
program = gpg
...
gpgsign = true